<extend name="work/base"/>
<block name="content">
    <div class="weui-msg">
        <div class="weui-msg__icon-area"><i class="weui-icon-success weui-icon_msg"></i></div>
        <div class="weui-msg__text-area">
            <h2 class="weui-msg__title">操作成功</h2>
            <p class="weui-msg__desc">{$msg}</p>
        </div>
        <div class="weui-msg__opr-area">
            <p class="weui-btn-area">
                <a href="{$url}" id="href" class="weui-btn weui-btn_primary">推荐跳转(等待时间:<b id="wait">{$wait}</b>)</a>
            </p>
        </div>
        <div class="weui-msg__extra-area">
            <div class="weui-footer">

            </div>
        </div>
    </div>
</block>
<block name="script">
    <script type="text/javascript">
        $(document).ready(function () {
            var wait = document.getElementById('wait'),
                href = document.getElementById('href').href;
            var interval = setInterval(function(){
                var time = --wait.innerHTML;
                if(time <= 0) {
                    location.href = href;
                    clearInterval(interval);
                };
            }, 1000);
        });
    </script>
</block>
